#!/bin/bash
BASEPATH=$(cd "$(dirname "$0")"; pwd)
file_dir=$(pwd)
file=`basename $file_dir`
args=`echo $* |  cut -d ' ' -f 2-`
case $1 in
    dev)
        #python $BASEPATH/manage.py ${args} --settings=${file}.settings.dev
        python3.5 $BASEPATH/manage.py ${args} --settings=${file}.settings.dev
        ;;
    test)
        python3.5 $BASEPATH/manage.py ${args} --settings=${file}.settings.test
        ;;
    staging)
        python3.5 $BASEPATH/manage.py ${args} --settings=${file}.settings.staging
        ;;
    production)
        python3.5 $BASEPATH/manage.py ${args} --settings=${file}.settings.production
        ;;
    *)
      echo "Usage: $0 [dev|test|staging|production] help"
      exit 1
      ;;
esac
exit 0
